{* Smarty *}
{extends file="include/base_with_menu.tpl"}

{block name="external_javascript"}
<script type="text/javascript" src="/scripts/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/scripts/oa_calendar.js"></script>
{/block}

{block name="javascript"}
<script type="text/javascript">
(function($) {
    $(function() {
        $('#last_maintain_date, #birthday').datepicker();
        $('#submit_button').click(function() {
            $value = $('input[name=bank_account]').val().replace(/\s+/g, '');
            $('input[name=bank_account]').val($value);
            $('#add_form').submit();
        });
    });
})(jQuery);
</script>
{/block}

{block name="content"}
<form id='add_form' method="post" action="/market/pr/school/teacher/add">
<h3 class="blockTitle">添加教师--基本信息</h3>
<div class="layout">
    <table width="100%" class="tbLayout01" cellspacing="0" cellpadding="0">
        <tr>
            <td width="110" class="textRight"><span class="cRed">*</span> 姓名:</td>
            <td class="textLeft">
                <input type="text" name="name" class="txt01" />
                <span class="cGreen">(2-4个汉字)</span>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">性别:</td>
            <td class="textLeft">
                <input type="radio" name="gender" value="" checked="checked" />不详&nbsp;
            {foreach $gender_setting as $id => $title}
                <input type="radio" name="gender" value="{$id}" />{$title}&nbsp;
            {/foreach}
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">出生年月:</td>
            <td class="textLeft">
                <input type="text" id="birthday" name="birthday" class="txt01" /> 
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">职务:</td>
            <td class="textLeft">
                <input type="text" class="txt01" name="job" />
                <span class="cGreen">(2-6个汉字)</span>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">年级/班级:</td>
            <td class="textLeft">
                <select name="grade" class="txt01">
                    <option value="">--年级--</option>
            {for $year=2011 to 2040}
                    <option value="{$year}">{$year}</option>
            {/for}
                </select>
                &nbsp;&nbsp;
                <select name="class" class="txt01">
                    <option value="">--班级--</option>
            {for $class=1 to 40}
                    <option value="{$class}">{$class}</option>
            {/for}
                </select>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">班别:</td>
            <td class="textLeft">
                <select name="class_type" class="txt01">
                    <option value="">--班别--</option>
            {foreach $class_type as $id => $title}
                    <option value="{$id}">{$title}</option>
            {/foreach}
                </select>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">手机:</td>
            <td class="textLeft">
                <input type="text" class="txt01" name="mobile" />
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">电话:</td>
            <td class="textLeft">
                <input type="text" class="txt01" name="telphone" />
                <span class="cGreen">(格式: 02885414200)</span>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">任课:</td>
            <td class="textLeft">
                <select class="txt01" name="discipline">
                    <option value="">--请选择--</option>
            {foreach $discipline_setting as $id => $title}
                    <option value="{$id}">{$title}</option>
            {/foreach}
                </select>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">已提成:</td>
            <td class="textLeft">
                <input type="text" class="txt01" name="deduct" />
                <span class="cGreen">(大于等于0的正整数，单位：元)</span>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">等级:</td>
            <td class="textLeft">
                <select class="txt01" name="level">
            {for $level=1 to 6}
                    <option value="{$level}">{$level}</option>
            {/for}
                </select>
            </td>
        </tr>
    </table>
</div>
<h3 class="blockTitle">添加教师--关系维护</h3>
<div class="layout">
    <table width="100%" class="tbLayout01" cellspacing="0" cellpadding="0">
        <tr>
            <td width="110" class="textRight">上次跟进日期:</td>
            <td class="textLeft">
                <input type="text" class="txt01" id="last_maintain_date" name="last_maintain_date" />
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">生活/反馈短信:</td>
            <td class="textLeft">
                <input type="text" class="txt01" name="feedback" size="110" />
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">节日礼物:</td>
            <td class="textLeft">
                <input type="text" class="txt01" name="festival_gift" size="110" />
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">银行卡号:</td>
            <td class="textLeft">
                <input type="text" class="txt01" name="bank_account" />
                <span class="cGreen">(格式：0000 0000 0000 0000)</span>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">营销联系人:</td>
            <td class="textLeft">
                <select class="txt01" name="contactor_id">
                    <option value="">--请选择--</option>
            {foreach $market_users as $user}
                    <option value="{$user.id}">{$user.name|escape}({$user.username|escape})</option>
            {/foreach}
                </select>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">片区负责人:</td>
            <td class="textLeft">
                <select class="txt01" name="area_manager_id">
                    <option value="">--请选择--</option>
            {foreach $market_users as $user}
                    <option value="{$user.id}">{$user.name|escape}({$user.username|escape})</option>
            {/foreach}
                </select>
            </td>
        </tr>
    </table>
</div>
<h3 class="blockTitle">添加教师--备注</h3>
<div class="layout">
    <table width="100%" class="tbLayout01" cellspacing="0" cellpadding="0">
        <tr>
            <td width="110" class="textRight">&nbsp;</td>
            <td class="textLeft">
                <textarea class="txt01" name="comment" cols="80" rows="5"></textarea>
                <br />
                <span class="cGreen">(字数限制为300个字)</span>
            </td>
        </tr>
        <tr>
            <td width="110" class="textRight">&nbsp;</td>
            <td class="textLeft">
                <input type="button" id="submit_button" value="提 交" />&nbsp;&nbsp;
                <input type="button" value="取 消" onclick="javascript:window.history.back();" />
            </td>
        </tr>
    </table>
    <input type="hidden" name="{$token_name|escape}" value="{$token_hash}" />
    <input type="hidden" name="return_url" value="{$return_url|default:''}" />
    <input type="hidden" name="school_id" value="{$school_id}" />
</div>
</form>
{/block}
